#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void Print(int sum)
{
	printf("%d:", sum);
	char* pin[10] = { "ling","yi","er","san","si","wu","liu","qi","ba","jiu" };
	int b[20];
	int i = 0;
	while (sum)
	{
		b[i++] = sum % 10;
		sum /= 10;
	}
	int j = 0;
	for (j = i - 1; j >= 0; j--)
		printf("%s ", pin[b[j]]);
	printf("\n");
}
int main()
{
	int row, col;
	scanf("%d%d", &row, &col);
	int a[10][10];
	int i, j;
	for (i = 0; i < row; i++)
		for (j = 0; j < col; j++)
			scanf("%d", &a[i][j]);
	for (i = 1; i < row; i+=2)
	{
		int sum = 0;
		for (j = 0; j < col; j++)
			sum += a[i][j];
		Print(sum);
	}
	return 0;
}